# coding=utf-8
import json
dict={}

def cobjson(obj):
    if(obj is None):
        dict['success']=True;
        return json.dumps(dict,"utf-8");
    else:
        dict['success']=True;
        dict['data']=obj;
        a=json.dumps(dict,"utf-8");
        return json.dumps(dict,"utf-8");

def cobobj(obj):
    if(obj is None):
        dict['success']=True;
        return json.dumps(dict,"utf-8");
    else:
        dict['success']=True;
        objdict = obj.__dict__;
        dict['data']=objdict;
        return json.dumps(dict,"utf-8",);


